/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package easy.core.util;
import easy.entities.BaseEntity;
import java.util.regex.*;
/**
 *
 * @author Julio
 */
public class ValidaEmail extends BaseEntity{
    private static final long serialVersionUID = 4221749590865725555L;

    public static boolean testaEmail(String x){
        Pattern p = Pattern.compile("^[\\w-]+(\\.[\\w-]+)*@([\\w-]+\\.)+[a-zA-Z]{2,7}$");
        Matcher m = p.matcher(x);
        if (!m.find()){
            return false;
        }else{
            return true;
        }
    }

}
